Java Design Patterns Interview Questions and Answers
Question: What is observer design pattern in Java?Answer: Observer design pattern is based on communicating changes in state of object to observers so that they can take there action. Simple example is a weather system where change in weather must be reflected in Views to show to public. Here weather object is Subject while different views are Observers. |
Is it helpful?
Yes
No
Most helpful rated by users:
- What is design patterns?
- Can you name few design patterns used in standard JDK library?
- What is Singleton design pattern in Java ? write code for thread-safe singleton in Java.
- What is main benefit of using factory pattern? Where do you use it?
- What is observer design pattern in Java?